const Permissions = {
  RealTimeTraffic: 1 << 0, //实时路况
  ViewAnnouncement: 1 << 1, //查看公告
  ReportRoadConditions: 1 << 2, //报告路况
  VideoMonitoring: 1 << 3, //视频监控
  EventAddition: 1 << 4, //事件添加
  EventQuery: 1 << 5, //事件查询
  EventUpdates: 1 << 6, //事件更新
  ReleaseAnnouncement: 1 << 7, //发布公告
  TrafficInformation: 1 << 8, //路况信息
  UserManagement: 1 << 9, // 用户管理
}

// 普通用户
const commonUserPermission =
  Permissions.RealTimeTraffic | Permissions.ViewAnnouncement | Permissions.ReportRoadConditions
// 交管部门
const trafficDepartmentPermission =
  Permissions.RealTimeTraffic |
  Permissions.VideoMonitoring |
  Permissions.EventAddition |
  Permissions.EventQuery |
  Permissions.EventUpdates |
  Permissions.ReleaseAnnouncement |
  Permissions.TrafficInformation
// 管理员
const adminPermission =
  Permissions.RealTimeTraffic |
  Permissions.VideoMonitoring |
  Permissions.EventAddition |
  Permissions.EventQuery |
  Permissions.EventUpdates |
  Permissions.ReleaseAnnouncement |
  Permissions.TrafficInformation |
  Permissions.UserManagement

// console.log(commonUserPermission, trafficDepartmentPermission, adminPermission)
module.exports = {
  commonUserPermission,
  trafficDepartmentPermission,
  adminPermission,
}
